<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage ceyloan
 * @since ceyloan 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<title>
<?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";

	?>
        </title>
	<link href="<?php bloginfo( 'stylesheet_url' ); ?>" rel="stylesheet" type='text/css' />
	<link rel="image" href="<?php echo get_template_directory_uri(); ?>/logo.png" />
	<?php 
		$is_ie;
	if(isset($_SERVER['HTTP_USER_AGENT']) && 
    (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)){
		$is_ie=true;
	?>
	<style type='text/css'>
		.c-rounded-corners, .widget-area, .box, #footer, #nav li a,#left-column,.artical-post, .artical-post .rounded-special-section{
			border-radius:15px;
			behavior:url(<?php echo get_template_directory_uri(); ?>/PIE_uncompressed.htc);
		}
	</style>
	<?php } ?>
	<?php wp_enqueue_script("jquery"); ?>
	<?php add_theme_support( 'automatic-feed-links' ); ?>
        <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
        <?php wp_head() ?>
</head>
<body <?php body_class(); ?>>
<div id='page'>
	<div id='graphic-l'></div>
	<div id="wrapper">
		<div id="header">
			<div id="header-img">
				<div id='title-container'>
				<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><div id='title' class='header-block c-rounded-corners'>
				<h1><?php bloginfo( 'name' ); ?></h1>
				<h2><?php bloginfo( 'description' ); ?></h2>
				</div></a>
                                <?php $options = ceyloan_get_theme_options();
                                $header_block_count=$options['box-count'];
                                if($header_block_count && !$is_ie){
                                    for($i=1;$i<=$header_block_count;$i++){ ?>
                                        <a href="<?php echo $options['url_'.$i] ?>"><div class='header-block c-rounded-corners' style="background-image: url('<?php echo get_template_directory_uri()."/".$options['back_'.$i] ?>')">

                                        </div></a>
                                    <?php }
                                }
                                ?>
				<div class='clearfix'></div>
				</div>
			<div id="navigation">
					<?php if(!wp_nav_menu( array( 'container_id' => 'menu', 'theme_location' => 'primary','menu_id'=>'nav', 'fallback_cb'=>'ceyloan_fallback_menu' ) )){
					} ?>
				<div class="clearfix"></div>
			</div>
			</div>
		</div>
		<div id="content">
			<div id="main">